package com.learn.designPatterns.structuralType.Proxy;

import java.net.MalformedURLException;
import java.net.URL;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-11-01 14:05
 */
public class ImageViewer {

    public static void main(String[] args) throws MalformedURLException {
        String image = "http://image.jpg";
        URL url = new URL(image);
        HighResolutionImage highResolutionImage = new HighResolutionImage(url);
        ImageProxy imageProxy = new ImageProxy(highResolutionImage);
        imageProxy.showImage();

    }
}
